import React, { useEffect } from 'react'
import { loginRouter } from '@/router/index'
import { useRoutes, useLocation } from 'react-router-dom'
import Form from './child/Form'
import af from '@/style/scss/login.module.scss'
import  { startSakura } from './child/sakura.js' 


// const startSakura:any = require('./child/sakura.js')

export default function Login() {


  const element = useRoutes(loginRouter)

  const { pathname } = useLocation()


  useEffect(() => {
    pathname === 'login' && startSakura()
  }, [])

  return (
    <div className={af.container}>
      <div className={af.contentBox}>
        <Form />
      </div>
      {/* { element } */}
    </div>
  )
}
